<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8"/>
    <title>Test Report</title>
    <link href="assets/style.css" rel="stylesheet" type="text/css"/></head>
  <body onLoad="init()">
    <script>/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
 * You can obtain one at http://mozilla.org/MPL/2.0/. */


function toArray(iter) {
    if (iter === null) {
        return null;
    }
    return Array.prototype.slice.call(iter);
}

function find(selector, elem) {
    if (!elem) {
        elem = document;
    }
    return elem.querySelector(selector);
}

function find_all(selector, elem) {
    if (!elem) {
        elem = document;
    }
    return toArray(elem.querySelectorAll(selector));
}

function sort_column(elem) {
    toggle_sort_states(elem);
    var colIndex = toArray(elem.parentNode.childNodes).indexOf(elem);
    var key;
    if (elem.classList.contains('numeric')) {
        key = key_num;
    } else if (elem.classList.contains('result')) {
        key = key_result;
    } else {
        key = key_alpha;
    }
    sort_table(elem, key(colIndex));
}

function show_all_extras() {
    find_all('.col-result').forEach(show_extras);
}

function hide_all_extras() {
    find_all('.col-result').forEach(hide_extras);
}

function show_extras(colresult_elem) {
    var extras = colresult_elem.parentNode.nextElementSibling;
    var expandcollapse = colresult_elem.firstElementChild;
    extras.classList.remove("collapsed");
    expandcollapse.classList.remove("expander");
    expandcollapse.classList.add("collapser");
}

function hide_extras(colresult_elem) {
    var extras = colresult_elem.parentNode.nextElementSibling;
    var expandcollapse = colresult_elem.firstElementChild;
    extras.classList.add("collapsed");
    expandcollapse.classList.remove("collapser");
    expandcollapse.classList.add("expander");
}

function show_filters() {
    var filter_items = document.getElementsByClassName('filter');
    for (var i = 0; i < filter_items.length; i++)
        filter_items[i].hidden = false;
}

function add_collapse() {
    // Add links for show/hide all
    var resulttable = find('table#results-table');
    var showhideall = document.createElement("p");
    showhideall.innerHTML = '<a href="javascript:show_all_extras()">Show all details</a> / ' +
                            '<a href="javascript:hide_all_extras()">Hide all details</a>';
    resulttable.parentElement.insertBefore(showhideall, resulttable);

    // Add show/hide link to each result
    find_all('.col-result').forEach(function(elem) {
        var collapsed = get_query_parameter('collapsed') || 'Passed';
        var extras = elem.parentNode.nextElementSibling;
        var expandcollapse = document.createElement("span");
        if (extras.classList.contains("collapsed")) {
            expandcollapse.classList.add("expander")
        } else if (collapsed.includes(elem.innerHTML)) {
            extras.classList.add("collapsed");
            expandcollapse.classList.add("expander");
        } else {
            expandcollapse.classList.add("collapser");
        }
        elem.appendChild(expandcollapse);

        elem.addEventListener("click", function(event) {
            if (event.currentTarget.parentNode.nextElementSibling.classList.contains("collapsed")) {
                show_extras(event.currentTarget);
            } else {
                hide_extras(event.currentTarget);
            }
        });
    })
}

function get_query_parameter(name) {
    var match = RegExp('[?&]' + name + '=([^&]*)').exec(window.location.search);
    return match && decodeURIComponent(match[1].replace(/\+/g, ' '));
}

function init () {
    reset_sort_headers();

    add_collapse();

    show_filters();

    sort_column(find('.initial-sort'));

    find_all('.sortable').forEach(function(elem) {
        elem.addEventListener("click",
                              function(event) {
                                  sort_column(elem);
                              }, false)
    });

};

function sort_table(clicked, key_func) {
    var rows = find_all('.results-table-row');
    var reversed = !clicked.classList.contains('asc');
    var sorted_rows = sort(rows, key_func, reversed);
    /* Whole table is removed here because browsers acts much slower
     * when appending existing elements.
     */
    var thead = document.getElementById("results-table-head");
    document.getElementById('results-table').remove();
    var parent = document.createElement("table");
    parent.id = "results-table";
    parent.appendChild(thead);
    sorted_rows.forEach(function(elem) {
        parent.appendChild(elem);
    });
    document.getElementsByTagName("BODY")[0].appendChild(parent);
}

function sort(items, key_func, reversed) {
    var sort_array = items.map(function(item, i) {
        return [key_func(item), i];
    });

    sort_array.sort(function(a, b) {
        var key_a = a[0];
        var key_b = b[0];

        if (key_a == key_b) return 0;

        if (reversed) {
            return (key_a < key_b ? 1 : -1);
        } else {
            return (key_a > key_b ? 1 : -1);
        }
    });

    return sort_array.map(function(item) {
        var index = item[1];
        return items[index];
    });
}

function key_alpha(col_index) {
    return function(elem) {
        return elem.childNodes[1].childNodes[col_index].firstChild.data.toLowerCase();
    };
}

function key_num(col_index) {
    return function(elem) {
        return parseFloat(elem.childNodes[1].childNodes[col_index].firstChild.data);
    };
}

function key_result(col_index) {
    return function(elem) {
        var strings = ['Error', 'Failed', 'Rerun', 'XFailed', 'XPassed',
                       'Skipped', 'Passed'];
        return strings.indexOf(elem.childNodes[1].childNodes[col_index].firstChild.data);
    };
}

function reset_sort_headers() {
    find_all('.sort-icon').forEach(function(elem) {
        elem.parentNode.removeChild(elem);
    });
    find_all('.sortable').forEach(function(elem) {
        var icon = document.createElement("div");
        icon.className = "sort-icon";
        icon.textContent = "vvv";
        elem.insertBefore(icon, elem.firstChild);
        elem.classList.remove("desc", "active");
        elem.classList.add("asc", "inactive");
    });
}

function toggle_sort_states(elem) {
    //if active, toggle between asc and desc
    if (elem.classList.contains('active')) {
        elem.classList.toggle('asc');
        elem.classList.toggle('desc');
    }

    //if inactive, reset all other functions and add ascending active
    if (elem.classList.contains('inactive')) {
        reset_sort_headers();
        elem.classList.remove('inactive');
        elem.classList.add('active');
    }
}

function is_all_rows_hidden(value) {
  return value.hidden == false;
}

function filter_table(elem) {
    var outcome_att = "data-test-result";
    var outcome = elem.getAttribute(outcome_att);
    class_outcome = outcome + " results-table-row";
    var outcome_rows = document.getElementsByClassName(class_outcome);

    for(var i = 0; i < outcome_rows.length; i++){
        outcome_rows[i].hidden = !elem.checked;
    }

    var rows = find_all('.results-table-row').filter(is_all_rows_hidden);
    var all_rows_hidden = rows.length == 0 ? true : false;
    var not_found_message = document.getElementById("not-found-message");
    not_found_message.hidden = !all_rows_hidden;
}
</script>
    <h1>20210910153330.html</h1>
    <p>Report generated on 10-Sep-2021 at 15:33:31 by <a href="https://pypi.python.org/pypi/pytest-html">pytest-html</a> v2.1.1</p>
    <h2>Environment</h2>
    <table id="environment">
      <tr>
        <td>JAVA_HOME</td>
        <td>D:\Program Files\Java\jdk1.8.0_151</td></tr>
      <tr>
        <td>Packages</td>
        <td>{"pluggy": "0.13.1", "py": "1.10.0", "pytest": "5.4.3"}</td></tr>
      <tr>
        <td>Platform</td>
        <td>Windows-10-10.0.19041-SP0</td></tr>
      <tr>
        <td>Plugins</td>
        <td>{"html": "2.1.1", "metadata": "1.11.0", "parallel": "0.1.0"}</td></tr>
      <tr>
        <td>Python</td>
        <td>3.8.5</td></tr></table>
    <h2>Summary</h2>
    <p>3 tests ran in 0.50 seconds. </p>
    <p class="filter" hidden="true">(Un)check the boxes to filter the results.</p><input checked="true" class="filter" data-test-result="passed" disabled="true" hidden="true" name="filter_checkbox" onChange="filter_table(this)" type="checkbox"/><span class="passed">0 passed</span>, <input checked="true" class="filter" data-test-result="skipped" disabled="true" hidden="true" name="filter_checkbox" onChange="filter_table(this)" type="checkbox"/><span class="skipped">0 skipped</span>, <input checked="true" class="filter" data-test-result="failed" hidden="true" name="filter_checkbox" onChange="filter_table(this)" type="checkbox"/><span class="failed">3 failed</span>, <input checked="true" class="filter" data-test-result="error" disabled="true" hidden="true" name="filter_checkbox" onChange="filter_table(this)" type="checkbox"/><span class="error">0 errors</span>, <input checked="true" class="filter" data-test-result="xfailed" disabled="true" hidden="true" name="filter_checkbox" onChange="filter_table(this)" type="checkbox"/><span class="xfailed">0 expected failures</span>, <input checked="true" class="filter" data-test-result="xpassed" disabled="true" hidden="true" name="filter_checkbox" onChange="filter_table(this)" type="checkbox"/><span class="xpassed">0 unexpected passes</span>
    <h2>Results</h2>
    <table id="results-table">
      <thead id="results-table-head">
        <tr>
          <th class="sortable result initial-sort" col="result">Result</th>
          <th class="sortable" col="name">Test</th>
          <th class="sortable numeric" col="duration">Duration</th>
          <th>Links</th></tr>
        <tr hidden="true" id="not-found-message">
          <th colspan="4">No results found. Try to check the filters</th></tr></thead>
      <tbody class="failed results-table-row">
        <tr>
          <td class="col-result">Failed</td>
          <td class="col-name">test_shou_user.py::test_002</td>
          <td class="col-duration">0.00</td>
          <td class="col-links"></td></tr>
        <tr>
          <td class="extra" colspan="4">
            <div class="log">self = &lt;PreparedRequest [POST]&gt;<br/>url = &#x27;http://localhost:9000http://localhost:9000/sys/login&#x27;<br/>params = OrderedDict()<br/><br/>    def prepare_url(self, url, params):<br/>        &quot;&quot;&quot;Prepares the given HTTP URL.&quot;&quot;&quot;<br/>        #: Accept objects that have string representations.<br/>        #: We&#x27;re unable to blindly call unicode/str functions<br/>        #: as this will include the bytestring indicator (b&#x27;&#x27;)<br/>        #: on python 3.x.<br/>        #: https://github.com/psf/requests/pull/2238<br/>        if isinstance(url, bytes):<br/>            url = url.decode(&#x27;utf8&#x27;)<br/>        else:<br/>            url = unicode(url) if is_py2 else str(url)<br/>    <br/>        # Remove leading whitespaces from url<br/>        url = url.lstrip()<br/>    <br/>        # Don&#x27;t do any URL preparation for non-HTTP schemes like `mailto`,<br/>        # `data` etc to work around exceptions from `url_parse`, which<br/>        # handles RFC 3986 only.<br/>        if &#x27;:&#x27; in url and not url.lower().startswith(&#x27;http&#x27;):<br/>            self.url = url<br/>            return<br/>    <br/>        # Support for unicode domain names and paths.<br/>        try:<br/>&gt;           scheme, auth, host, port, path, query, fragment = parse_url(url)<br/><br/>D:\Python38\lib\site-packages\requests\models.py:382: <br/>_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _<br/><br/>url = &#x27;http://localhost:9000http://localhost:9000/sys/login&#x27;<br/><br/>    def parse_url(url):<br/>        &quot;&quot;&quot;<br/>        Given a url, return a parsed :class:`.Url` namedtuple. Best-effort is<br/>        performed to parse incomplete urls. Fields not provided will be None.<br/>        This parser is RFC 3986 compliant.<br/>    <br/>        The parser logic and helper functions are based heavily on<br/>        work done in the ``rfc3986`` module.<br/>    <br/>        :param str url: URL to parse into a :class:`.Url` namedtuple.<br/>    <br/>        Partly backwards-compatible with :mod:`urlparse`.<br/>    <br/>        Example::<br/>    <br/>            &gt;&gt;&gt; parse_url(&#x27;http://google.com/mail/&#x27;)<br/>            Url(scheme=&#x27;http&#x27;, host=&#x27;google.com&#x27;, port=None, path=&#x27;/mail/&#x27;, ...)<br/>            &gt;&gt;&gt; parse_url(&#x27;google.com:80&#x27;)<br/>            Url(scheme=None, host=&#x27;google.com&#x27;, port=80, path=None, ...)<br/>            &gt;&gt;&gt; parse_url(&#x27;/foo?bar&#x27;)<br/>            Url(scheme=None, host=None, port=None, path=&#x27;/foo&#x27;, query=&#x27;bar&#x27;, ...)<br/>        &quot;&quot;&quot;<br/>        if not url:<br/>            # Empty<br/>            return Url()<br/>    <br/>        source_url = url<br/>        if not SCHEME_RE.search(url):<br/>            url = &quot;//&quot; + url<br/>    <br/>        try:<br/>            scheme, authority, path, query, fragment = URI_RE.match(url).groups()<br/>            normalize_uri = scheme is None or scheme.lower() in NORMALIZABLE_SCHEMES<br/>    <br/>            if scheme:<br/>                scheme = scheme.lower()<br/>    <br/>            if authority:<br/>                auth, host, port = SUBAUTHORITY_RE.match(authority).groups()<br/>                if auth and normalize_uri:<br/>                    auth = _encode_invalid_chars(auth, USERINFO_CHARS)<br/>                if port == &quot;&quot;:<br/>                    port = None<br/>            else:<br/>                auth, host, port = None, None, None<br/>    <br/>            if port is not None:<br/>                port = int(port)<br/>                if not (0 &lt;= port &lt;= 65535):<br/>                    raise LocationParseError(url)<br/>    <br/>            host = _normalize_host(host, scheme)<br/>    <br/>            if normalize_uri and path:<br/>                path = _remove_path_dot_segments(path)<br/>                path = _encode_invalid_chars(path, PATH_CHARS)<br/>            if normalize_uri and query:<br/>                query = _encode_invalid_chars(query, QUERY_CHARS)<br/>            if normalize_uri and fragment:<br/>                fragment = _encode_invalid_chars(fragment, FRAGMENT_CHARS)<br/>    <br/>        except (ValueError, AttributeError):<br/>&gt;           return six.raise_from(LocationParseError(source_url), None)<br/><br/>D:\Python38\lib\site-packages\urllib3\util\url.py:392: <br/>_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _<br/><br/>value = None, from_value = None<br/><br/>&gt;   ???<br/><span class="error">E   urllib3.exceptions.LocationParseError: Failed to parse: http://localhost:9000http://localhost:9000/sys/login</span><br/><br/>&lt;string&gt;:3: LocationParseError<br/><br/>During handling of the above exception, another exception occurred:<br/><br/>init = &lt;api.request.Reque object at 0x0000026F03706BE0&gt;<br/><br/>    def test_002(init):<br/>        # 从yam文件中获取指定接口的数据<br/>        data = loadData.getApiInfo(&#x27;login&#x27;)<br/>        # 获取接口数据中断言<br/>        asst = data.get(&#x27;asst&#x27;)<br/>        # 将接口参数给Reque，然后由send_request发送请求<br/>&gt;       res = init.send_request(data)<br/><br/>test_shou_user.py:24: <br/>_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _<br/>..\api\request.py:80: in send_request<br/>    self.response = self.session.request(method=method,url=url,data=data,headers=headers)<br/>D:\Python38\lib\site-packages\requests\sessions.py:528: in request<br/>    prep = self.prepare_request(req)<br/>D:\Python38\lib\site-packages\requests\sessions.py:456: in prepare_request<br/>    p.prepare(<br/>D:\Python38\lib\site-packages\requests\models.py:316: in prepare<br/>    self.prepare_url(url, params)<br/>_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _<br/><br/>self = &lt;PreparedRequest [POST]&gt;<br/>url = &#x27;http://localhost:9000http://localhost:9000/sys/login&#x27;<br/>params = OrderedDict()<br/><br/>    def prepare_url(self, url, params):<br/>        &quot;&quot;&quot;Prepares the given HTTP URL.&quot;&quot;&quot;<br/>        #: Accept objects that have string representations.<br/>        #: We&#x27;re unable to blindly call unicode/str functions<br/>        #: as this will include the bytestring indicator (b&#x27;&#x27;)<br/>        #: on python 3.x.<br/>        #: https://github.com/psf/requests/pull/2238<br/>        if isinstance(url, bytes):<br/>            url = url.decode(&#x27;utf8&#x27;)<br/>        else:<br/>            url = unicode(url) if is_py2 else str(url)<br/>    <br/>        # Remove leading whitespaces from url<br/>        url = url.lstrip()<br/>    <br/>        # Don&#x27;t do any URL preparation for non-HTTP schemes like `mailto`,<br/>        # `data` etc to work around exceptions from `url_parse`, which<br/>        # handles RFC 3986 only.<br/>        if &#x27;:&#x27; in url and not url.lower().startswith(&#x27;http&#x27;):<br/>            self.url = url<br/>            return<br/>    <br/>        # Support for unicode domain names and paths.<br/>        try:<br/>            scheme, auth, host, port, path, query, fragment = parse_url(url)<br/>        except LocationParseError as e:<br/>&gt;           raise InvalidURL(*e.args)<br/><span class="error">E           requests.exceptions.InvalidURL: Failed to parse: http://localhost:9000http://localhost:9000/sys/login</span><br/><br/>D:\Python38\lib\site-packages\requests\models.py:384: InvalidURL<br/> ------------------------------Captured stderr call------------------------------ <br/>2021-09-10 15:33:30,915  request send_request[44]  INFO ：get url http://localhost:9000http://localhost:9000/sys/login
2021-09-10 15:33:30,915  request send_request[62]  INFO ：get data {&#x27;username&#x27;: &#x27;小皮在此&#x27;, &#x27;password&#x27;: 123, &#x27;role&#x27;: &#x27;member&#x27;}
2021-09-10 15:33:30,915  request send_request[73]  INFO ：get method POST
<br/> -------------------------------Captured log call-------------------------------- <br/>INFO     tools.loggingModule:request.py:44 get url http://localhost:9000http://localhost:9000/sys/login
INFO     tools.loggingModule:request.py:62 get data {&#x27;username&#x27;: &#x27;小皮在此&#x27;, &#x27;password&#x27;: 123, &#x27;role&#x27;: &#x27;member&#x27;}
INFO     tools.loggingModule:request.py:73 get method POST<br/></div></td></tr></tbody>
      <tbody class="failed results-table-row">
        <tr>
          <td class="col-result">Failed</td>
          <td class="col-name">test_shou_user.py::test_004</td>
          <td class="col-duration">0.00</td>
          <td class="col-links"></td></tr>
        <tr>
          <td class="extra" colspan="4">
            <div class="log">init = &lt;api.request.Reque object at 0x0000026F03706BE0&gt;<br/><br/>    def test_004(init):<br/>        data = loadData.getApiInfo(&#x27;category&#x27;)<br/>        # 获取接口数据中断言<br/>        asst = data.get(&#x27;asst&#x27;)<br/>        # 将接口参数给Reque，然后由send_request发送请求<br/>&gt;       res = init.send_request(data)<br/><br/>test_shou_user.py:36: <br/>_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _<br/>..\api\request.py:51: in send_request<br/>    headers[k] = os.environ[(v.lstrip(&#x27;$&#x27;))]<br/>_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _<br/><br/>self = environ({&#x27;ALLUSERSPROFILE&#x27;: &#x27;C:\\ProgramData&#x27;, &#x27;ANALYSIS_PATH&#x27;: &#x27;C:\\Program Files (x86)\\HP\\LoadRunner\\&#x27;, &#x27;ANDROID_...re-rasterizer --enable-features=NetworkServiceInProcess&#x27;, &#x27;PYTEST_CURRENT_TEST&#x27;: &#x27;test_shou_user.py::test_004 (call)&#x27;})<br/>key = &#x27;token&#x27;<br/><br/>    def __getitem__(self, key):<br/>        try:<br/>            value = self._data[self.encodekey(key)]<br/>        except KeyError:<br/>            # raise KeyError with the original key value<br/>&gt;           raise KeyError(key) from None<br/><span class="error">E           KeyError: &#x27;token&#x27;</span><br/><br/>D:\Python38\lib\os.py:675: KeyError<br/> ------------------------------Captured stderr call------------------------------ <br/>2021-09-10 15:33:31,155  request send_request[44]  INFO ：get url http://localhost:9000http://localhost:9000/main/sell/category/show
<br/> -------------------------------Captured log call-------------------------------- <br/>INFO     tools.loggingModule:request.py:44 get url http://localhost:9000http://localhost:9000/main/sell/category/show<br/></div></td></tr></tbody>
      <tbody class="failed results-table-row">
        <tr>
          <td class="col-result">Failed</td>
          <td class="col-name">test_shou_user.py::test_003</td>
          <td class="col-duration">0.00</td>
          <td class="col-links"></td></tr>
        <tr>
          <td class="extra" colspan="4">
            <div class="log">self = &lt;PreparedRequest [GET]&gt;<br/>url = &#x27;http://localhost:9000http://localhost:9000/sys/logout&#x27;<br/>params = OrderedDict([(&#x27;page&#x27;, 1)])<br/><br/>    def prepare_url(self, url, params):<br/>        &quot;&quot;&quot;Prepares the given HTTP URL.&quot;&quot;&quot;<br/>        #: Accept objects that have string representations.<br/>        #: We&#x27;re unable to blindly call unicode/str functions<br/>        #: as this will include the bytestring indicator (b&#x27;&#x27;)<br/>        #: on python 3.x.<br/>        #: https://github.com/psf/requests/pull/2238<br/>        if isinstance(url, bytes):<br/>            url = url.decode(&#x27;utf8&#x27;)<br/>        else:<br/>            url = unicode(url) if is_py2 else str(url)<br/>    <br/>        # Remove leading whitespaces from url<br/>        url = url.lstrip()<br/>    <br/>        # Don&#x27;t do any URL preparation for non-HTTP schemes like `mailto`,<br/>        # `data` etc to work around exceptions from `url_parse`, which<br/>        # handles RFC 3986 only.<br/>        if &#x27;:&#x27; in url and not url.lower().startswith(&#x27;http&#x27;):<br/>            self.url = url<br/>            return<br/>    <br/>        # Support for unicode domain names and paths.<br/>        try:<br/>&gt;           scheme, auth, host, port, path, query, fragment = parse_url(url)<br/><br/>D:\Python38\lib\site-packages\requests\models.py:382: <br/>_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _<br/><br/>url = &#x27;http://localhost:9000http://localhost:9000/sys/logout&#x27;<br/><br/>    def parse_url(url):<br/>        &quot;&quot;&quot;<br/>        Given a url, return a parsed :class:`.Url` namedtuple. Best-effort is<br/>        performed to parse incomplete urls. Fields not provided will be None.<br/>        This parser is RFC 3986 compliant.<br/>    <br/>        The parser logic and helper functions are based heavily on<br/>        work done in the ``rfc3986`` module.<br/>    <br/>        :param str url: URL to parse into a :class:`.Url` namedtuple.<br/>    <br/>        Partly backwards-compatible with :mod:`urlparse`.<br/>    <br/>        Example::<br/>    <br/>            &gt;&gt;&gt; parse_url(&#x27;http://google.com/mail/&#x27;)<br/>            Url(scheme=&#x27;http&#x27;, host=&#x27;google.com&#x27;, port=None, path=&#x27;/mail/&#x27;, ...)<br/>            &gt;&gt;&gt; parse_url(&#x27;google.com:80&#x27;)<br/>            Url(scheme=None, host=&#x27;google.com&#x27;, port=80, path=None, ...)<br/>            &gt;&gt;&gt; parse_url(&#x27;/foo?bar&#x27;)<br/>            Url(scheme=None, host=None, port=None, path=&#x27;/foo&#x27;, query=&#x27;bar&#x27;, ...)<br/>        &quot;&quot;&quot;<br/>        if not url:<br/>            # Empty<br/>            return Url()<br/>    <br/>        source_url = url<br/>        if not SCHEME_RE.search(url):<br/>            url = &quot;//&quot; + url<br/>    <br/>        try:<br/>            scheme, authority, path, query, fragment = URI_RE.match(url).groups()<br/>            normalize_uri = scheme is None or scheme.lower() in NORMALIZABLE_SCHEMES<br/>    <br/>            if scheme:<br/>                scheme = scheme.lower()<br/>    <br/>            if authority:<br/>                auth, host, port = SUBAUTHORITY_RE.match(authority).groups()<br/>                if auth and normalize_uri:<br/>                    auth = _encode_invalid_chars(auth, USERINFO_CHARS)<br/>                if port == &quot;&quot;:<br/>                    port = None<br/>            else:<br/>                auth, host, port = None, None, None<br/>    <br/>            if port is not None:<br/>                port = int(port)<br/>                if not (0 &lt;= port &lt;= 65535):<br/>                    raise LocationParseError(url)<br/>    <br/>            host = _normalize_host(host, scheme)<br/>    <br/>            if normalize_uri and path:<br/>                path = _remove_path_dot_segments(path)<br/>                path = _encode_invalid_chars(path, PATH_CHARS)<br/>            if normalize_uri and query:<br/>                query = _encode_invalid_chars(query, QUERY_CHARS)<br/>            if normalize_uri and fragment:<br/>                fragment = _encode_invalid_chars(fragment, FRAGMENT_CHARS)<br/>    <br/>        except (ValueError, AttributeError):<br/>&gt;           return six.raise_from(LocationParseError(source_url), None)<br/><br/>D:\Python38\lib\site-packages\urllib3\util\url.py:392: <br/>_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _<br/><br/>value = None, from_value = None<br/><br/>&gt;   ???<br/><span class="error">E   urllib3.exceptions.LocationParseError: Failed to parse: http://localhost:9000http://localhost:9000/sys/logout</span><br/><br/>&lt;string&gt;:3: LocationParseError<br/><br/>During handling of the above exception, another exception occurred:<br/><br/>init = &lt;api.request.Reque object at 0x0000026F03706BE0&gt;<br/><br/>    def test_003(init):<br/>        data = loadData.getApiInfo(&#x27;logout&#x27;)<br/>        # 获取接口数据中断言<br/>        asst = data.get(&#x27;asst&#x27;)<br/>        # 将接口参数给Reque，然后由send_request发送请求<br/>&gt;       res = init.send_request(data)<br/><br/>test_shou_user.py:47: <br/>_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _<br/>..\api\request.py:90: in send_request<br/>    self.response = self.session.request(method=method,url=url,params=params,headers=headers)<br/>D:\Python38\lib\site-packages\requests\sessions.py:528: in request<br/>    prep = self.prepare_request(req)<br/>D:\Python38\lib\site-packages\requests\sessions.py:456: in prepare_request<br/>    p.prepare(<br/>D:\Python38\lib\site-packages\requests\models.py:316: in prepare<br/>    self.prepare_url(url, params)<br/>_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _<br/><br/>self = &lt;PreparedRequest [GET]&gt;<br/>url = &#x27;http://localhost:9000http://localhost:9000/sys/logout&#x27;<br/>params = OrderedDict([(&#x27;page&#x27;, 1)])<br/><br/>    def prepare_url(self, url, params):<br/>        &quot;&quot;&quot;Prepares the given HTTP URL.&quot;&quot;&quot;<br/>        #: Accept objects that have string representations.<br/>        #: We&#x27;re unable to blindly call unicode/str functions<br/>        #: as this will include the bytestring indicator (b&#x27;&#x27;)<br/>        #: on python 3.x.<br/>        #: https://github.com/psf/requests/pull/2238<br/>        if isinstance(url, bytes):<br/>            url = url.decode(&#x27;utf8&#x27;)<br/>        else:<br/>            url = unicode(url) if is_py2 else str(url)<br/>    <br/>        # Remove leading whitespaces from url<br/>        url = url.lstrip()<br/>    <br/>        # Don&#x27;t do any URL preparation for non-HTTP schemes like `mailto`,<br/>        # `data` etc to work around exceptions from `url_parse`, which<br/>        # handles RFC 3986 only.<br/>        if &#x27;:&#x27; in url and not url.lower().startswith(&#x27;http&#x27;):<br/>            self.url = url<br/>            return<br/>    <br/>        # Support for unicode domain names and paths.<br/>        try:<br/>            scheme, auth, host, port, path, query, fragment = parse_url(url)<br/>        except LocationParseError as e:<br/>&gt;           raise InvalidURL(*e.args)<br/><span class="error">E           requests.exceptions.InvalidURL: Failed to parse: http://localhost:9000http://localhost:9000/sys/logout</span><br/><br/>D:\Python38\lib\site-packages\requests\models.py:384: InvalidURL<br/> ------------------------------Captured stderr call------------------------------ <br/>2021-09-10 15:33:31,181  request send_request[44]  INFO ：get url http://localhost:9000http://localhost:9000/sys/logout
2021-09-10 15:33:31,181  request send_request[65]  INFO ：get params {&#x27;page&#x27;: 1}
2021-09-10 15:33:31,181  request send_request[73]  INFO ：get method get
<br/> -------------------------------Captured log call-------------------------------- <br/>INFO     tools.loggingModule:request.py:44 get url http://localhost:9000http://localhost:9000/sys/logout
INFO     tools.loggingModule:request.py:65 get params {&#x27;page&#x27;: 1}
INFO     tools.loggingModule:request.py:73 get method get<br/></div></td></tr></tbody></table></body></html>